<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html>
<head>
   <link rel="stylesheet" href="<s:url value="/resources"/>/css/innerstyle.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/cupertino/jquery-ui.custom.min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/ui.jqgrid.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/ui.multiselect.css" />
    <script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-ui.custom.min.js"></script>  
    <script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/grid.locale-cn.js"></script> 
    <script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.jqGrid.min.js"></script>
    <script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>


<style type="text/css">
html,body {
	margin: 0;
	padding: 0;
	font-size: 85%;
}

#tab {
	width: 99%;
	border: #F4F4F4 solid 4px;
	padding: 0 2px 3px 2px;
	margin: 0;
	float: left;
}

#tab h1 {
	display: block;
	width: 95%;
	height: 45px;
	float: center;
	text-align: center;
	padding-top: 5px;
}

#tab h1 span {
	width: 250px;
	font: bold 26px/55px Arial, Helvetica, sans-serif;
	color: #fff;
	background-color: #fff;
	display: block;
}

.textbox {
	width: 90px;
	border: #000 1px solid;
}

.textboxs {
	width: 70px;
	border: #000 1px solid;
}

.textboxs1 {
	width: 70px;
	border: #000 1px solid;
	background-color: #ddd;
}

.longtextbox {
	width: 180px;
	border: #000 1px solid;
}

.longtextbox1 {
	width: 180px;
	border: #000 1px solid;
	background-color: #ddd;
}

.shorttextbox {
	width: 50px;
	border: #000 1px solid;
}

.shorttextbox1 {
	width: 50px;
	border: #000 1px solid;
	background-color: #ddd;
}

.textarea {
	overflow: auto;
	border: #000 1px solid;
}

.textarea1 {
	overflow: auto;
	border: #000 1px solid;
	background-color: #ddd;
}

.select div {
	border: 1px solid #000;
	float: left;
}

label {
	display: block;
}

fieldset {
	padding: 0;
	border: 0;
	margin-top: 25px;
}

label.error {
	color: red; /*错误信息的颜色*/
}

input.error {
	border: 1px dotted red; /*输入错误的输入框的边框样式*/
}
</style>
<script type='text/javascript'> 

    $(function(){ 
        $("#but1").button();
        $("#but3").button(); 
        
    });
	
	function submitRow() {
	var s = '${ydxx.yingdbm}';	

	var url = "<s:url value="/"/>/gpjy/saveCjxxInfo?ydbh="+s;
	$( "#dialog-confirm1" ).dialog({
			resizable: false,
			height:140,
			modal: true,
			buttons: {
				"确认": function() {
					$.post(url, function(data) {
                   var json =eval('(' + data + ')');
                    if(json.result==1){					   
					   alert("操作成功！");	
					   window.returnValue=1;
                       window.close();				   
					   }else{					  
					   alert("操作失败！");
					   }   
                   }); 
				},
				"返回": function() {
					$( this ).dialog( "close" );
				}
			}
		});

}


	</script>

</head>

<body>

	<div id="tab">
		<h1>挂 牌 应 单</h1>

		<form name="form1" id="form1">
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>出卖人（销方）:
					</td>
					<td> 
					${bdxx.baodrdwmc}
					</td>
					<td>煤炭用途:
					</td>
					<td>
					${bdxx.meitytmc}
					</td>
					<td>交收方式:
					</td>
					<td>
					${bdxx.jiaosfsmc}
						</td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td>${ydxx.yingddw}</td>
					<td>价格类型:</td>
					<td>${bdxx.jiaglxmc}
					</td>
					<td>交收地点:</td>
					<td>${bdxx.jiaosdd}</td>
				</tr>

				<tr>
					<td>发货单位:</td>
					<td>
					<c:if test="${bdxx.maimlx==6}">
					${bdxx.fhdwmc}
					</c:if>
					<c:if test="${bdxx.maimlx==5}">
					${ydxx.yinddm}
					</c:if>
					</td>
					<td>隶属行业:</td>
					<td>${bdxx.lismc}</td>
					<td>产地:</td>
					<td>${bdxx.yuancd}</td>
				</tr>
<tr>
					<td>流向:
					</td>
					<td>${bdxx.liux}
					</td>
					<td>专用线:
					</td>
					<td>
						${bdxx.zhuanyx}
					</td>
					<td>最少交易方式:
					</td>
					<td><c:if test="${bdxx.zuixjyfs==1}">
					最少交易车数
					</c:if>
						 <c:if test="${bdxx.zuixjyfs==0}">
						 最少交易量
						 </c:if>
					</td>
				</tr>
				
				<tr>
				<c:if test="${bdxx.zuixjyfs==1}">
					<td id="zxjs">最少节数:
					</td>
					<td id="zxjs1">
						${bdxx.zuixjycj} 
					</td>
					</c:if>
					
					<td>
					<c:if test="${bdxx.zuixjyfs==0}">
						 最少交易量：
						 </c:if>
						<c:if test="${bdxx.zuixjyfs==1}">
					    每节吨数：
					</c:if>
					</td>
					<td id="mjds1">
					${bdxx.zuixjyl}
					</td>
				</tr>
				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、交（提）货时间、数量
					</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th rowspan="3">收货人名称
									</th>
									<th rowspan="3">发站</th>
									<th rowspan="3">到站</th>
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br>(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）
									</th>
								</tr>
								<tr>
									<th rowspan="2">全年合计
									</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td rowspan="2">
									<c:if test="${bdxx.maimlx==6}">
									${ydxx.shdwmc}
									</c:if>
									<c:if test="${bdxx.maimlx==5}">
									${bdxx.fhdwmc}
									</c:if>
									</td>
									<td  rowspan="2">
									<c:if test="${bdxx.maimlx==6}">
									${bdxx.fadzmc}
									</c:if>
									<c:if test="${bdxx.maimlx==5}">
									${ydxx.fadzname}
									</c:if>
									</td>
									<td  rowspan="2">
									<c:if test="${bdxx.maimlx==6}">
									${ydxx.fadzname}
									</c:if>
									<c:if test="${bdxx.maimlx==5}">
									${bdxx.fadzmc}
									</c:if>
									</td>
									<td rowspan="2">${bdxx.pinzgg}</td>
									<td rowspan="2">${bdxx.zhilzb}</td>
									<td rowspan="2">${bdxx.danj}
									</td>
									<td>${bdxx.shul}
									</td>
									<td>${bdxx.gml1}
									</td>
									<td>${bdxx.gml2}
									</td>
									<td>${bdxx.gml3}
									</td>
									<td>${bdxx.gml4}
									</td>
									<td>${bdxx.gml5}
									</td>
									<td>${bdxx.gml6}
									</td>
									<td>${bdxx.gml7}
									</td>
									<td>${bdxx.gml8}
									</td>
									<td>${bdxx.gml9}
									</td>
									<td>${bdxx.gml10}
									</td>
									<td>${bdxx.gml11}
									</td>
									<td>${bdxx.gml12}
									</td>
									
								</tr>
								<tr>
									<td>${ydxx.yingdsl}
									</td>
									<td>${ydxx.ygml1}
									</td>
									<td>${ydxx.ygml2}
									</td>
									<td>${ydxx.ygml3}
									</td>
									<td>${ydxx.ygml4}
									</td>
									<td>${ydxx.ygml5}
									</td>
									<td>${ydxx.ygml6}
									</td>
									<td>${ydxx.ygml7}
									</td>
									<td>${ydxx.ygml8}
									</td>
									<td>${ydxx.ygml9}
									</td>
									<td>${ydxx.ygml10}
									</td>
									<td>${ydxx.ygml11}
									</td>
									<td>${ydxx.ygml12}
									</td>

								</tr>
							</tbody>
						</table></td>
				</tr>


				<tr>
					<td>备注:</td>
					<td>${bdxx.beiz}
					</td>
					
				</tr>
				<tr style="line-height:26px;">
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0"  border rules=rows frame=below >
							<c:forEach var="tk" items="${mrhttk}">
								<tr>
									<td width="400px">${tk.xh}${tk.biaot}</td>
									<td><textarea cols="142" rows="2" class="textarea" name="neir">${tk.neir}</textarea>
									</td>
								</tr>
							</c:forEach>
						</table></td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellpadding="0" cellspacing="0" style="width:100%"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th colspan="2">出卖人(销方)</th>
									<th colspan="2">买受人（购方）</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td><table id="sjsdnr" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>出卖人名称：</td>
												<td>
												<c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrmc}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrmc}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrzs}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrzs}
												</c:if></td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrfddbr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrfddbr}
												</c:if></td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrwtdlr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrwtdlr}
												</c:if></td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrdh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrdh}
												</c:if></td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrcz}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrcz}
												</c:if></td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodryzbm}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdryzbm}
												</c:if></td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrkhyh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrkhyh}
												</c:if></td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodryhzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdryhzh}
												</c:if></td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodrnsrdjzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdrnsrdjzh}
												</c:if></td>
											</tr>
										</table>
									</td>
									<td><table id="sjsdnr1" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>出卖人结算单位名称：
												</td>
												<td>
													<c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrmc}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrmc}
												</c:if>								
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrzs}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrzs}
												</c:if></td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrfddbr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrfddbr}
												</c:if></td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrwtdlr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrwtdlr}
												</c:if></td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrdh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrdh}
												</c:if></td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrcz}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrcz}
												</c:if></td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsryzbm}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsryzbm}
												</c:if></td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrkhyh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrkhyh}
												</c:if></td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsryhzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsryhzh}
												</c:if></td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${bdxx.baodjsrnsrdjzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${ydxx.yingdjsrnsrdjzh}
												</c:if></td>
											</tr>
										</table>
									</td>
									<td><table id="bjsdnr" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>买受人名称：</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrmc}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrmc}
												</c:if></td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrzs}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrzs}
												</c:if></td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrfddbr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrfddbr}
												</c:if></td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrwtdlr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrwtdlr}
												</c:if></td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrdh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrdh}
												</c:if></td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrcz}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrcz}
												</c:if></td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdryzbm}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodryzbm}
												</c:if></td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrkhyh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrkhyh}
												</c:if></td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdryhzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodryhzh}
												</c:if></td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdrnsrdjzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodrnsrdjzh}
												</c:if></td>
											</tr>
										</table>
									</td>
									<td><table id="bjsdnr1" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>买受人结算单位名称：</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrmc}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrmc}
												</c:if></td>												
											</tr>
											<tr>
												<td>住 所:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrzs}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrzs}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrfddbr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrfddbr}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrwtdlr}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrwtdlr}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrdh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrdh}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrcz}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrcz}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsryzbm}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsryzbm}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrkhyh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrkhyh}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsryhzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsryhzh}
												</c:if>
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><c:if test="${bdxx.maimlx==6}">
												${ydxx.yingdjsrnsrdjzh}
												</c:if>
												<c:if test="${bdxx.maimlx==5}">
												${bdxx.baodjsrnsrdjzh}
												</c:if>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</tbody>
						</table></td>

				</tr>
				<tr>
					<td colspan="4"><font size="2" color="#FF0000"><br>
					</font>
					</td>
					<td align="right"><font size="2">年度：</font>
					</td>
					<td style="text-align:right">
						<div class="select">
							<div>
								${bdxx.nianf}
							</div>
						</div> <font size="2">有效期：</font> <input id="kssj" type="text"
						name="kaissj" class="textbox"  readonly value="${bdxx.hetksrq}"/> 至
						<input id="jssj" type="text" class="textbox" name="jiessj" readonly value="${bdxx.hetjsrq}"/>
					</td>
				</tr>
				<tr>
					<td colspan="6" align="center">
					    <input id="but1"
						type="button" name="" value="确认成交" onclick="submitRow();"/> &nbsp;&nbsp;&nbsp;<input
						id="but3" type="button" name="" value="关闭"
						onClick="window.returnValue=1;window.close();" />
					</td>
				</tr>
			</table>
			<input type="hidden" name="yd.baodbh" value="">
		</form>
	</div>

	<div id="dialog-confirm1" title="是否确认成交？"></div>

</body>
</html>

